<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp" %>

<!DOCTYPE html>
<html>
<head>
    <title><spring:message code="message.jieSuan.jiaoKuanTongZhiShu"/><spring:message code="message.jieSuan.zhangHuChaKan"/></title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp" %>
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
							
    <section class="content-header">
        <h1><spring:message code="message.jieSuan.jiaoKuanTongZhiShu"/></h1>
        <ol class="breadcrumb">
            <li><a href="${ctx }/home.jsp"><i class="fa fa-home"></i><spring:message code="message.lable.first"/></a></li>
           <li class="active"><spring:message code="message.jieSuan.jiaoKuanDanGuanLi"/></li>
            <li class="active"><spring:message code="message.jieSuan.jiaoKuanTongZhiShu"/></li>
        </ol>
    </section>
    
    <section class="content">
        <div class=" box box-success">
            <div class="box-body">
                <div class="input">
                	<div class="textalign"><spring:message code="message.jieSuan.jiaoKuanTongZhiShu"/><spring:message code="message.listForm.mingCheng"/><spring:message code="message.yanZheng.maoHao"/></div>
                    	<div class="boxinput">
                        <input type="text" class="textinput" id="noticeName" placeholder="<spring:message code="message.jieSuan.jiaoKuanTongZhiShu"/><spring:message code="message.listForm.mingCheng"/>"/>
                   		</div>
                	<div class="textalign"><spring:message code="message.jieSuan.jiaoKuanTongZhiShu"/><spring:message code="message.listForm.bianHao"/><spring:message code="message.yanZheng.maoHao"/></div>
                		<div class="boxinput">
                        <input type="text" class="textinput" id="noticeNo" placeholder="<spring:message code="message.jieSuan.jiaoKuanTongZhiShu"/><spring:message code="message.listForm.bianHao"/>" />
                    	</div>
                    <div class="textalign" >
                    <button type="button" class="btn btn-success btn-sm" onclick="gridSerch();" id="selectDicCompType"><spring:message code="message.button.seachSpacing"/></button>
                </div>
                </div>
            </div>
        </div>
        
        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>
    </section>
    
    <%@ include file="/WEB-INF/component/commonJS.jsp" %>
    
    <script type="text/javascript">
	   //绑定回车
	   $('#noticeName,#noticeNo').bind('keydown', function(event) { 
	       if (event.keyCode == "13") {
	           $('#selectDicCompType').click();
	       }
	   });	
	   $("#noticeName").focus();//加载页面光标在第一个查询框内
    
        $(function () {
        	jQuery("#gridlist").jqGrid({
    			url: "${ctx}/setPaynotice/getsettleInfoListyy.html",
    		    mtype: "POST",
    			datatype: "json",
    			autowidth: true,
    			shrinkToFit: false,
    			height: 350,
    		   	colNames:['<spring:message code="message.jqGrid.cz"/>',
    		   	          '<spring:message code="message.jieSuan.jiaoKuanTongZhiShu"/>',
    		   	          '<spring:message code="message.jieSuan.jiaoKuanTongZhiShu"/><spring:message code="message.listForm.bianHao"/>',
    		   	          '<spring:message code="message.jieSuan.jiaoKuanTongZhiShu"/><spring:message code="message.listForm.mingCheng"/>',
    		   	          '<spring:message code="message.jieSuan.jiaoKuanTongZhiKaiShiTime"/>',
                          '<spring:message code="message.jieSuan.jiaoKuanTongZhiJieShuTime"/>',
                          '<spring:message code="message.jieSuan.jiaoKuanTongZhiHOSP"/>',
    		   	          'recpOrgId',
    		   	          '<spring:message code="message.jieSuan.daiJiaoKuanTiaoMuShu"/>',
    		   	          '<spring:message code="message.jieSuan.daiJiaoKuanJinE"/>'
    		   	          ],
    		   	colModel:[
					{ name: 'oper', width:60, align:"center", sortable:false,
						formatter:function(cellvalue, options,row) {
								 return "<a href='${ctx}/setPaynotice/toSetPaynoticeDetail.html?noticeId="+row.noticeId+"' style='background:url(${ctx}/lib/img/icon/icon.png) no-repeat -100px 0px' class='opIcon' title='<spring:message code="message.jqGrid.cz.xiangQing"/>'></a>";
							}   
						},
    				{ name: 'noticeId', width:160,hidden:true,align:"center" ,sortable:false},
    		   		{ name: 'noticeNo', width:180, align:"center",sortable:false},
    		   		{ name: 'noticeName', width:200, align:"center",sortable:false},
    		   		{ name: 'scheduleBegTime', width:150,align:"center",sortable:false},
    		   		{ name: 'scheduleEndTime', width:150,align:"center",sortable:false},
    		   		{ name: 'hospName', width:150,align:"center",sortable:false},
    		   		{ name: 'recpOrgId', width:200,hidden:true,align:"center",sortable:false},
    		   		{ name: 'repOrderCount', width:150,align:"center",sortable:false,
    		   			formatter:function(cellvalue, options,row) {
   						 return cellvalue==null?0:cellvalue;
   		     		}
    		   		},
    		   		{ name: 'amount', width:100, align:"right",sortable:false,
    		   			formatter:function(cellvalue, options,row) {
    						 return formatAmount(cellvalue, options,row);
    		     		}
    		   		}
    		   		
    		   	],
    		   	
    			 rowNum: 20,
    		     rowList: [10, 20, 50, 100],
    		     rownumbers: true,
    		     pager: "#gridpage",
    		     viewrecords: true,
    		     gridComplete: function(){
      	        	 //序号列宽度自适应（参数为jqgridID）
      	               autoRNWidth("gridlist");
      	           	//数据只有一条时默认选中（参数为jqgridID）
      	               selectByOneData("gridlist");
      			},
    		     caption: "<spring:message code="message.jieSuan.jiaoKuanTongZhiShu"/><spring:message code="message.listForm.lieBiao"/>",
    		     jsonReader: {
    		         repeatitems: false,
    		         id: "ids"
    		     }
    		});
            
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            
            $(window).trigger("resize");
            
        });
        
        
      //查询
        function gridSerch() {
        	var noticeNo = $.trim($("#noticeNo").val());
        	var noticeName = $.trim($("#noticeName").val());
    		$("#gridlist").jqGrid('setGridParam',{  
    	        datatype:'json',
    	        postData:{
    	        		"noticeNo":noticeNo,
    	        		"noticeName":noticeName},
    	        		page:1
    	    }).trigger("reloadGrid"); //重新载入  
    	}
        
   	 //回调
		 function operResult(val){
	        	var strs = new Array();
	            strs = val.split("|$");
	      
	            	if (val.length>0) {
						$('#'+strs[0]).val(strs[2]);
					}
					if (val.length>0) {
						$('#'+strs[1]).html(strs[3]);
					}
	        }
		 
    </script>
</body>
</html>












